<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="format-detection" content="telephone=no" />
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width" />
<title>{% block title %}{% endblock %}{{site_options.title}}</title>
<meta name="keywords" content="{{site_options.keyword}}" />
<meta name="description" content="{{site_options.description}}" />
<link rel="apple-touch-icon" href="http://mt-other.qiniudn.com/apple-touch-icon.png" />
<link rel="stylesheet" href="http://s.lovewith.me/static/??css/reset.css,mobile/css/main.css?t=205615" />
</head>
<body class="{% block pageclass %}{% endblock %}">
<header class="clearfixed">
    <details class="hd-menu" id="hd-menu">
        <summary class="ui-a">分类</summary>
        <section>
            <nav class="hd-cate">
                <div><a href="/">首页</a></div>
                {% for c in cates %}
                <a href="/share/cate/{{c.id}}/">{{c.name}}</a>
                {% endfor %}
            </nav>
            <div class="hd-search" id="hd-search">
                <form action="" method="get">
                    <input type="text" name="key" class="inp-text" value="" placeholder="输入关键词" />
                    <button class="ui-a"></button>
                </form>
            </div>
            <div class="hd-color">
                {% for c in colors %}
                    <span><a title="{{c.name}}" href="/share/search/color/{{c.color|replace('#','')}}/" style="background-color:{{c.color}}"></a></span>
                {% endfor %}
            </div>
        </section>
    </details>
    <!--div class="hd-bak" id="hd-bak"><a href="" class="ui-a"></a></div-->
    <h2 class="hd-logbox">
        <span class="ui-a hd-logo"></span>
        <a id="sub-title" href="/"></a>
    </h2>
    <section class="hd-user">
        {% if not user.is_authenticated() %}
            <a href="/u/sign/" id="hd-u-sign"><img src="http://s.lovewith.me/static/images/avatar.gif" width="32" height="32" /></a>
        {% else %}
            <a href="/u/{{user.id}}/like/"><img src="{{user.avatar}}!50" width="32" height="32" /></a>
        {% endif %}
    </section>
</header>

{% block main %}
{% endblock %}

<footer>
    <a href="/">首页</a>
</footer>
<script>var siteConfig = { {% if user.is_authenticated() %}user: {id: {{user.id}}, name: '{{user.username}}'}{%endif%}};</script>
<script src="http://s.lovewith.me/static/mobile/js/??zepto.js,head.js,widget/lazyload.js?t=205615"></script>
<script>var _hmt = _hmt || [];{% block statsScript %}{% endblock %};(function() {var hm = document.createElement("script");hm.src = "//hm.baidu.com/hm.js?422ecc8fa62c31efe8d364b214de93bf";var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s);})();</script>
{% block script %}{% endblock %}
<script>(function(i,s,o,g,r,a,m){i["GoogleAnalyticsObject"]=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,"script","//www.google-analytics.com/analytics.js","ga");ga("create","UA-50652587-1","lovewith.me");ga('require','linkid','linkid.js');ga('require','displayfeatures');ga("send","pageview");</script>
</body>
</html>
